package com.csun.cmny.provider.service.impl;

import com.csun.cmny.base.dto.CacReturnDto;
import com.csun.cmny.provider.dao.CacOldmanMinorMapper;
import com.csun.cmny.provider.dao.CacTypeMapper;
import com.csun.cmny.provider.dto.CocReturnDto;
import com.csun.cmny.provider.pojo.CacOldmanMinor;
import com.csun.cmny.provider.pojo.CacOldmanMinorPojo;
import com.csun.cmny.provider.pojo.CacType;
import com.csun.cmny.provider.service.CacOldmanMinorService;
import com.csun.cmny.provider.service.CacTypeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service("CacOldmanMinorService")
public class CacOldmanMinorServiceImpl implements CacOldmanMinorService {
    @Resource
    CacOldmanMinorMapper cacOldmanMinorMapper;

    @Override
    public int insert(CacOldmanMinor cacOldmanMinor) {
        return cacOldmanMinorMapper.insertSelective(cacOldmanMinor);
    }

    @Override
    public int insertBatch(List<CacOldmanMinor> cacOldmanMinors) {
        return cacOldmanMinorMapper.insertBatch(cacOldmanMinors);
    }

    @Override
    public int delByOidAndCacId(CacOldmanMinor cacOldmanMinor) {
        return cacOldmanMinorMapper.delByOidAndCacId(cacOldmanMinor);
    }

    @Override
    public List<Map<String, Object>> selectCacOldMnr(CacOldmanMinor cacOldmanMinor) {
        return cacOldmanMinorMapper.selectCacOldMnr(cacOldmanMinor);
    }

    @Override
    public int deleteByOldmanId(Integer oldmanId) {
      return  cacOldmanMinorMapper.deleteByOldmanId(oldmanId);

    }

    @Override
    public List<CacReturnDto> selectByOldmanId(Integer oldmanId) {
        return cacOldmanMinorMapper.selectByOldmanId(oldmanId);
    }



    @Override
    public int newInsertBatch(List<CacOldmanMinorPojo> list){
        return cacOldmanMinorMapper.newInsertBatch(list);
    }

}
